package ae.pcfc.etks.online.common.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * ClientSRoleReq entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_CLIENT_SERVICE_ROLE_REQ", schema = "ETKS_ONLINE_DBA")
@SequenceGenerator(name = "SQ_ETKS_SR_REQ", sequenceName = "SQ_ETKS_SR_REQ", initialValue = 1, allocationSize = 1)
public class ClientServiceRoleReq implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// Fields

	private Long csReqRoleId;
	private ServiceRole ServiceRole;
	private Client Client;

	// Constructors

	/** default constructor */
	public ClientServiceRoleReq() {
	}

	/** full constructor */
	public ClientServiceRoleReq(ServiceRole ServiceRole,
			Client Client) {
		this.ServiceRole = ServiceRole;
		this.Client = Client;
	}

	// Property accessors
	@Id	
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator="SQ_ETKS_SR_REQ")
	@Column(name = "CS_REQ_ROLE_ID", nullable = false, precision = 11, scale = 0)
	public Long getCsReqRoleId() {
		return this.csReqRoleId;
	}

	public void setCsReqRoleId(Long csReqRoleId) {
		this.csReqRoleId = csReqRoleId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SERVICE_ROLE_ID")
	public ServiceRole getServiceRole() {
		return this.ServiceRole;
	}

	public void setServiceRole(ServiceRole ServiceRole) {
		this.ServiceRole = ServiceRole;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLIENT_ID")
	public Client getClient() {
		return this.Client;
	}

	public void setClient(Client Client) {
		this.Client = Client;
	}
}